package utils;

import user.Save;

import java.sql.DriverManager;
import java.util.ArrayList;
import java.util.List;

public class AddressBookDAO implements IAddressBookDAO {
    public int insert(Save save){
        String sql="insert into tb_user values(null,?,?,?,?,?)";
        List<Object> list=new ArrayList();
        list.add(save.getAccountid());
        list.add(save.getName());
        list.add(save.getGood());
        list.add(save.getNumber());
        list.add(save.getTotal());
        int i=DBUtils.executeUpdate(sql,list);
        return i;
    }

    @Override
    public Save findgoods(String name) {
        return null;
    }

    @Override
    public int deletegoods(String name) {
        return 0;
    }

    @Override
    public int updategoods(Save save) {
        return 0;
    }
    public void findall(){
//"select count(gender) from order"
    }
}
